//
//  CompleteForgetViewController.m
//  viewController
//
//  Created by rimi on 15/10/10.
//  Copyright (c) 2015年 ouyang. All rights reserved.
//

#import "CompleteForgetViewController.h"
   

@interface CompleteForgetViewController ()

@property (nonatomic, strong)UITextField *newerPWTF;
@property (nonatomic, strong)UITextField *repeatPWTF;

@property (nonatomic, strong)UIButton *completeButton;

@end

@implementation CompleteForgetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self initBackButton];
    [self initNavTitle:@"忘记密码"];
    
    [self.view addSubview:self.newerPWTF];
    [self.view addSubview:self.repeatPWTF];
    [self.view addSubview:self.completeButton];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (UITextField *)newerPWTF {
    if (!_newerPWTF) {
        _newerPWTF = ({
            UITextField *textField = [[UITextField alloc]initWithFrame:flexibleFrame(CGRectMake(0, 0, 379, 40), NO)];
            textField.center =  flexibleCenter(CGPointMake(WIDTH / 2, 200));
            textField.placeholder = @"请输入新密码";
            textField.layer.masksToBounds = YES;
            textField.layer.borderWidth = 1;
            textField.layer.borderColor = THEMECOLOR.CGColor;
            textField.textAlignment = NSTextAlignmentCenter;
            textField;
        });
    }
    return _newerPWTF;
}

- (UITextField *)repeatPWTF {
    if (!_repeatPWTF) {
        _repeatPWTF = ({
            UITextField *textField = [[UITextField alloc]initWithFrame:flexibleFrame(CGRectMake(0, 0, 379, 40), NO)];
            textField.center =  flexibleCenter(CGPointMake(WIDTH / 2, 239));
            textField.placeholder = @"请再次输入新密码";
            textField.layer.masksToBounds = YES;
            textField.layer.borderWidth = 1;
            textField.layer.borderColor = THEMECOLOR.CGColor;
            textField.textAlignment = NSTextAlignmentCenter;
            textField;
        });
    }
    return _repeatPWTF;
}

- (UIButton *)completeButton {
    if (!_completeButton) {
        _completeButton = ({
            UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
            button.frame = flexibleFrame(CGRectMake(0, 0, WIDTH / 2 + 1, 50), NO);
            button.center =  flexibleCenter(CGPointMake(WIDTH / 2, 340));
            button.titleLabel.font = [UIFont systemFontOfSize:18];
            button.layer.borderColor = THEMECOLOR.CGColor;
            button.layer.masksToBounds = YES;
            button.layer.borderWidth = 1;
            button.layer.cornerRadius = 5.0F;
            button.backgroundColor = THEMECOLOR;
            [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            [button setTitle:@"完成" forState:UIControlStateNormal];
            button;
        });
    }
    return _completeButton;
}

@end
